let baseUrl = "https://mock.mengxuegu.com/mock/5fdc6ffb5b350029c77c973a/mxg-education-app/"

function http({
	url,
	method = "GET",
	data = {}
}) {
	return new Promise((resolve, reject) => {
		uni.request({
			url: baseUrl + url,
			method,
			data,
			success: res => {
				resolve(res)
			},
			fail: err => {
				reject(err)
			}
		})

	})

}
export {
	http
}
